<template>
  <div style="display: flex;align-items: center;justify-content: center" class="height100">
    <el-result title="404" sub-title="无法访问该页面" icon="warning">
      <template #extra>
        <el-button type="primary" @click="toIndex">
          返回首页
        </el-button>
      </template>
    </el-result>
  </div>
</template>

<script>
import { useRouter } from 'vue-router'

export default {
  name: '404',
  setup () {
    const router = useRouter()
    const toIndex = () => {
      router.push({
        path: '/'
      })
    }
    return {
      toIndex
    }
  }
}
</script>

<style scoped>

</style>
